raar.behaviour
Class RAMathExpression

java.lang.Object
  extended byraar.behaviour.RAMathExpression
All Implemented Interfaces:
RAAllowed, RAAllowedEverywhere, RAAllowedInList, RAAllowedInType, RAAssignable, RAEqualityComparable, RAFullComparable, RAMathObject, java.io.Serializable

public class RAMathExpression
extends java.lang.Object
implements RAMathObject, RAAssignable

See Also:
Serialized Form

Field Summary
static int ADD
           
static int DIVIDE
           
static int MULTIPLY
           
static int POWER
           
static int SUBTRACT
           
 
Constructor Summary
RAMathExpression(RAMathObject x, RAMathObject y, int operation)
           
 
Method Summary
 boolean canContain(RAAllowed other)
           
 boolean equals(RAEqualityComparable r)
          Test whether the two values are equal.
 RAReal evaluate()
           
 boolean larger(RAFullComparable r)
          Returns true if this real is larger than r, given the specific tolerance in the config file.
 boolean largerEquals(RAFullComparable r)
          Returns true if this real is larger than r or equals, given the specific tolerance in the config file.
 RAAllowed makeClone()
           
 boolean smaller(RAFullComparable r)
          Returns true if this real is smaller than r, given the specific tolerance in the config file.
 boolean smallerEquals(RAFullComparable r)
          Returns true if this real is smaller than r or equals r, given the specific tolerance in the config file.
 java.lang.String toString()
           
 RADataType value()
          Vraag de waarde op van de klasse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final int ADD
See Also:
Constant Field Values

SUBTRACT

public static final int SUBTRACT
See Also:
Constant Field Values

MULTIPLY

public static final int MULTIPLY
See Also:
Constant Field Values

DIVIDE

public static final int DIVIDE
See Also:
Constant Field Values

POWER

public static final int POWER
See Also:
Constant Field Values
Constructor Detail

RAMathExpression

public RAMathExpression(RAMathObject x,
                        RAMathObject y,
                        int operation)
Method Detail

evaluate

public RAReal evaluate()
                throws RAException
Throws:
RAException

value

public RADataType value()
                 throws RAException
Description copied from interface: RAMathObject
Vraag de waarde op van de klasse.

Specified by:
value in interface RAMathObject
Returns:
De waarde (RADataType)
Throws:
RAException

makeClone

public RAAllowed makeClone()
                    throws RAException
Specified by:
makeClone in interface RAAllowed
Throws:
RAException

equals

public boolean equals(RAEqualityComparable r)
               throws RAException
Test whether the two values are equal. Returns false if one of them is null, returns true if both are null or obviously if the values are equal.

Specified by:
equals in interface RAEqualityComparable
Throws:
RAException

larger

public boolean larger(RAFullComparable r)
               throws RAException
Returns true if this real is larger than r, given the specific tolerance in the config file. Returns false if one of them is null and if both are null or obviously if this expression is larger than r.

Specified by:
larger in interface RAFullComparable
Parameters:
r - Another real bites the dust
Returns:
true or false, see above.
Throws:
RAException

smaller

public boolean smaller(RAFullComparable r)
                throws RAException
Returns true if this real is smaller than r, given the specific tolerance in the config file. Returns false if one of them is null and if both are null or obviously if this expression is smaller than r.

Specified by:
smaller in interface RAFullComparable
Parameters:
r - Another real bites the dust
Returns:
true or false, see above.
Throws:
RAException

largerEquals

public boolean largerEquals(RAFullComparable r)
                     throws RAException
Returns true if this real is larger than r or equals, given the specific tolerance in the config file. Refer to methods larger and equals for null handling policies.

Specified by:
largerEquals in interface RAFullComparable
Parameters:
r - Another real bites the dust
Returns:
true or false, see above.
Throws:
RAException

smallerEquals

public boolean smallerEquals(RAFullComparable r)
                      throws RAException
Returns true if this real is smaller than r or equals r, given the specific tolerance in the config file. Refer to methods larger and equals for null handling policies.

Specified by:
smallerEquals in interface RAFullComparable
Parameters:
r - Another real bites the dust
Returns:
true or false, see above.
Throws:
RAException

toString

public java.lang.String toString()

canContain

public boolean canContain(RAAllowed other)
Specified by:
canContain in interface RAAllowed